package com.mycompany.core;

import java.io.OutputStream;
import java.util.List;
import java.util.Map;

public interface ITemplateManager {
	/**
	 * Parses html template
	 * 
	 * @param content html content
	 * @param params parameters to replace in content html
	 * @return parsed document with params included
	 */
	public String parseTemplate(String content, Map<String, Object> params);
	
	/**
	 * Parses html templates
	 * 
	 * @param contents html content documents
	 * @param params parameters to replace in content html
	 * @return concatenated parsed documents with params included
	 */
	public String parseTemplates(List<String> contents, Map<String, Object> params);
	
	/**
	 * Converts html to pdf
	 * @param htmlDoc html document content
	 * @param os Output stream to write data to
	 */
	public void convertToPdf(String htmlDoc, OutputStream os);
	
	/**
	 * Converts html to pdf, replaces params with values
	 * @param htmlDoc htmlDoc html document content
	 * @param params parameters to replace in content html
	 * @param os Output stream to write data to
	 */
	public void convertToPdf(String htmlDoc, Map<String, Object> params, OutputStream os);
	
	/**
	 * Converts html to pdf, replaces params with values
	 * @param htmlDocs htmlDoc html documents contents
	 * @param params parameters to replace in content html
	 * @param os Output stream to write data to
	 */
	public void convertToPdf(List<String> htmlDocs, Map<String, Object> params, OutputStream os);
}
